<!DOCTYPE html>
<html lang="<%=I18n.locale%>">
<head>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8">

  <title><%= [@page_title, ActiveAdmin.application.site_title(self)].compact.join(" | ") %></title>

  <% ActiveAdmin.application.stylesheets.each do |style, options| %>
    <% if ActiveAdmin.application.use_webpacker %>
      <%= stylesheet_pack_tag style, **options %>
    <% else %>
      <%= stylesheet_link_tag style, **options %>
    <% end %>
  <% end %>
  <% ActiveAdmin.application.javascripts.each do |path, options| %>
    <% if ActiveAdmin.application.use_webpacker %>
      <%= javascript_pack_tag path, **options %>
    <% else %>
      <%= javascript_include_tag path, **options %>
    <% end %>
  <% end %>

  <%= favicon_link_tag ActiveAdmin.application.favicon if ActiveAdmin.application.favicon %>

  <% ActiveAdmin.application.meta_tags_for_logged_out_pages.each do |name, content| %>
    <%= tag(:meta, name: name, content: content) %>
  <% end %>

  <%= csrf_meta_tags %>
  <%= csp_meta_tag %>
</head>
<body class="active_admin logged_out <%= controller.action_name %>">
<div id="wrapper">

  <div id="content_wrapper">
    <div class="flashes">
      <% flash_messages.each do |type, message| %>
        <%= content_tag :div, message, class: "flash flash_#{type}" %>
      <% end %>
    </div>
    <div id="active_admin_content">
      <%= yield %>
    </div>
  </div>
  <div id="footer">
    <%= yield :footer %>
  </div>
</div>
</body>
</html>
